[#ftl]
[#assign security=JspTaglibs["http://www.springframework.org/security/tags"] /]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

    <title>[#if title != '']${title}[#else]Welcome[/#if] | ${rc.getMessage("webapp.name")}</title>    
    <meta http-equiv="Cache-Control" content="no-store"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Expires" content="0"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    
    <link rel="shortcut icon" href="${base}/images/favicon.ico" type="image/x-icon"/>    	    
	<link href="${base}/styles/tmpStyle.css" rel="stylesheet" type="text/css">
	<link href="${base}/styles/upload.css" rel="stylesheet" type="text/css">
	<link href="${base}/styles/default.css" rel="stylesheet" type="text/css">
	<link href="${base}/styles/home/default.css" rel="stylesheet" type="text/css">
	<link href="${base}/styles/floatpopup.css" type="text/css" rel="stylesheet"/>
    <link href="${base}/styles/fancybox/jquery.fancybox-1.3.1.css" type="text/css" rel="stylesheet"/>    
    <link href="${base}/styles/jcrop/jquery.Jcrop.css" type="text/css" rel="stylesheet"/>
    <link href="${base}/styles/alerts/jquery.alerts.css" type="text/css" rel="stylesheet"/>
    <link href="${base}/styles/popeye/jquery.popeye.css" type="text/css" rel="stylesheet"/>
    <link href="${base}/styles/popeye/jquery.popeye.style.css" type="text/css" rel="stylesheet"/>
    <link href="${base}/styles/pigStyle.css" rel="stylesheet" type="text/css">
	
	<script type="text/javascript" src="${base}/scripts/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="${base}/scripts/jquery.ui.core.min.js"></script>
	<script type="text/javascript" src="${base}/scripts/jquery.ui.widget.min.js"></script>   
	<script type="text/javascript" src="${base}/scripts/jquery.ui.button.js"></script>
	<script type="text/javascript" src="${base}/scripts/jquery.Jcrop.js"></script>
	<script type="text/javascript" src="${base}/scripts/jquery.form.js"></script>
	<script type="text/javascript" src="${base}/scripts/jquery.fancybox-1.3.1.js"></script>
	<script type="text/javascript" src="${base}/scripts/jquery.lightweight.blockUI.js"></script>
	<script type="text/javascript" src="${base}/scripts/jquery.jeditable.js"></script>
	<script type="text/javascript" src="${base}/scripts/jquery.elastic.js"></script>	
    <script type="text/javascript" src="${base}/scripts/fancybox/jquery.mousewheel-3.0.2.pack.js"></script>
    <script type="text/javascript" src="${base}/scripts/alerts/jquery.alerts.js"></script>
    <script type="text/javascript" src="${base}/scripts/jquery.popeye.min.js"></script>
	<script type="text/javascript" src="${base}/scripts/DD_roundies_0.0.2a-min.js"></script>

    <link type="text/css" rel="stylesheet" href="${base}/scripts/poshytip/tip-twitter/tip-twitter.css" />
	<script type="text/javascript" src="${base}/scripts/poshytip/jquery.poshytip.js"></script>
	
	<script type="text/javascript">
		var ctx = '${rc.contextPath}';
	</script>
	
	<script type="text/javascript" src="${base}/scripts/common.js"></script>
	<script type="text/javascript" src="${base}/scripts/common.updateAvatar.js"></script>
	<script type="text/javascript" src="${base}/scripts/common.updateStatus.js"></script>
	<script type="text/javascript" src="${base}/scripts/common.like.js"></script>
	<script type="text/javascript" src="${base}/scripts/rightZone.js"></script>
    <script type="text/javascript" src="${base}/scripts/common.userNotification.js"></script>
    <script type="text/javascript" src="${base}/scripts/common.readmore.js"></script>
    <script type="text/javascript" src="${base}/scripts/common.comment.js"></script>    
    <script type="text/javascript" src="${base}/scripts/common.friendList.js"></script>
	<script type="text/javascript" src="${base}/scripts/upload.js"></script>
	  
	<script type="text/javascript" src="${base}/dwr/interface/GoalManager.js"></script>
	<script type="text/javascript" src="${base}/dwr/interface/UserManagerExt.js"></script>
	<script type="text/javascript" src="${base}/dwr/interface/PagingManager.js"></script>
	<script type="text/javascript" src="${base}/dwr/interface/UploadMonitor.js"></script>
	<script type="text/javascript" src="${base}/dwr/interface/LikeService.js"></script>
	
	<script type="text/javascript" src="${base}/dwr/engine.js"></script>    
	<script type="text/javascript" src="${base}/dwr/util.js"></script> 
	<script type="text/javascript">
		jQuery("document").ready(function(){
			DD_roundies.addRule('.bogoc', '5px', true);
			jQuery(".ppy").popeye();
			
			jQuery("input#topSearch").keydown(function(e){
				if(e.keycode == 13 || e.which == 13){
					jQuery("form[name=topsearchform]").submit();
				}
			}).focus(function(){
				if (this.value == "tìm kiếm bạn bè...") {
					this.value = "";
				}
			}).blur(function() {
				if (this.value.trim() == "") {
					this.value = "tìm kiếm bạn bè...";
				} 
			});
		});		
		var currentUser = null;
		[#if (data?? && data.userInSession?exists)]
		currentUser = '${data.userInSession}';
		[/#if]
	</script>
    ${head}		
    <script type="text/javascript">
	  var _gaq = _gaq || [];
	  _gaq.push(['_setAccount', 'UA-19209368-2']);
	  _gaq.push(['_trackPageview']);
	
	  (function() {
	    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	  })();
	</script>
</head>

<body>
<div id="all">	
	<div class="align headerBar" align="center">
        <div class="main headerBarContent UsePositionRelative">
            <div class="searchBox UsePositionAbsolute">
            	<form name="topsearchform" action="${rc.contextPath}/search.html" method="POST">
                <input type="text" value="tìm kiếm bạn bè..." name="keyword" id="topSearch"/>
                <input type="hidden" value="1" name="searchType"/>
                <input type="hidden" value="0" name="page"/>
                <span></span>
                </form>                
            </div>
            
            [#if (data?? && data.userInSession?exists)]
	            <ul>
	                <li class="settingiGoal">	                    
	                    <label><a href="/dashboard.html">Trang chủ</a></label>	                    
	                </li>
	                <li class="line"></li>
					<li class="settingiGoal">	                    
	                    <label><a href="${rc.contextPath}/userAccountSettings.html">Quản lý tài khoản</a></label>	                    
	                </li>
	                <li class="line"></li>
	                <li>
	                    <dl>
	                        <dd class="l"></dd>
	                        <dt>Xin chào: ${data.userInSession}</dt>
	                        <dd class="r" style="width:2px;">
	                            <!--span></span-->
	                        </dd>
	                    </dl>
	                </li>
	                <li class="logout">
	                    <a href="${rc.contextPath}/j_spring_security_logout">[ Thoát ]</a>
	                </li>
	            </ul>
	        [#elseif (data??)]
	        	<ul>
	                <li class="settingiGoal">
	                    <a href="${rc.contextPath}/login.html">
	                        <label>Đăng nhập</label><span></span>
	                    </a>
	                </li>	                
	            </ul>
	        [#else]
	        	 ${exception}
            [/#if]
        </div>
    </div>
    [#if (data?? && data.userInSession?exists)]
    	[#if (data.settings??)]
    		${data.settings.accountActivated?string("","<div class='accountIsNotActivated'>Bạn hãy kích hoạt tài khoản của bạn để có thể sử dụng đầy đủ tính năng của iGoal.vn</div>")}
    	[/#if]
    [/#if]
    <div class="align banner" align="center">
        <div class="main UsebackgroundPosition bannerImage UsePositionRelative">
            <div class="logoDefault">
                    <a href="${rc.contextPath}/dashboard.html" title="Chia sẻ mục tiêu của bạn">
                        <img src="${base}/images/logoDefault.png" width="136" height="54" alt="IGoal Logo" />
                    </a>
                    <label title="Hãy cùng nhau đi đến thành công!">Chia sẻ mục tiêu của bạn</label>
                </div>        
        </div>
    </div>
    <div class="align" align="center">
        <div class="main">
            [#include "/views/messages.ftl"/]
        	${body}
        </div>
    </div>
</div>
 <div class="clear"></div>
    <div class="home_footer home_footerAlign" align="center">
        <div class="main">

            <div class="min_logo">
                <a   href="http://www.igoal.vn" title="Chia sẻ mục tiêu của bạn">
                    <img src="/images/min_logo.png" width="76" height="26" alt="IGoal Logo" />
                </a>
                <label title="Hãy cùng nhau đi đến thành công!">Chia sẻ mục tiêu của bạn</label>
            </div>
            <ul>
                <li><a href="/viewPage.html?page=aboutUs" title="iGoal.vn">iGoal.vn</a></li>
                <li><a href="/viewPage.html?page=term" title="Thỏa thuận sử dụng">Thỏa thuận sử dụng</a></li>
                <li><a href="/viewPage.html?page=privacy" title="Bảo vệ riêng tư">Bảo vệ riêng tư</a></li>
                <!--li><a href="" title="Đăng quảng cáo">Đăng quảng cáo</a></li-->
                <li class="last"><a href="/viewPage.html?page=contactUs" title="Liên hệ">Liên hệ</a></li>                                    
            </ul>
            <span>
                Copyright © 2010 iGoal<br />
            </span>
        </div>
    </div>
    <div style="display:none">
	    <!--div id="updateAvatar">
	    	<div id="newAvatar" style="width: 600px; height: 450px">
	    		<img src="/images/sample_avatar.jpg" id="cropbox" width="600px" height="450px"/>			
	    	</div>
	    	<div id="userAvatar">
		    	<form id="uploadAvatarForm" enctype="multipart/form-data">
					<div class="title">
						<div class="left">Tải hình ảnh lên</div>
					</div>
					<div class="uploadimg">
						<input name="image" type="file" style="float: left;"/>
						<input name="avatar" value="avatar" type="hidden"/>
						<div class="w7"></div>
						<input class="uploadbutton" type="submit" value="Upload" />
					</div>
				</form>
				<form id="uploadScaledAvatarForm" enctype="multipart/form-data" style="display: none">
					<input name="scaledAvatar" value="scaledAvatar" type="hidden"/>
					<input name="x" value="" type="hidden"/>
					<input name="y" value="" type="hidden"/>				
					<input name="w" value="" type="hidden"/>
					<input name="h" value="" type="hidden"/>
					<input name="s" value="" type="hidden"/>
					<div class="w7"></div>
					<input class="uploadbutton" type="submit" value="Crop" />
				</form>
			</div>
	    </div-->   
	    <div id="updateAvatar" class="uploadAvatarPopup" style="padding:15px;">
      		<span class="icon_1 uploadAvatarIcon"></span><h1>Thay đổi hình đại diện</h1>
        	<div class="clearthis"></div>
        	<div class="uploaderBox">
        		<p>Bạn có thể tải tập tin <b>JPG</b>, <b>GIF</b> hoặc <b>PNG</b>, tối đa là <b>4MB</b>, kích cỡ tối thiểu <b>180x180px</b></p>
            	<form id="uploadAvatarForm" enctype="multipart/form-data" onsubmit="startProgress('#uploadAvatarForm');" style="float:left;clear:both">
		            <div class="input-file">
	                    <label><span>Chọn file...</span>
	                    <input type="hidden" value="4194304" name="MAX_FILE_SIZE">  
	                    <input type="file" id="avatarFile" name="image">
	                    <input name="avatar" value="avatar" type="hidden"/>
	                    </label>
	                    <var>
	                    <input type="text" readonly="readonly" value="" id="txtFileName" name="txtFileName">
	                    </var> 
	    	        </div>
	    	        
	    	        <p class="termUploader">iGoal không chịu trách nhiệm với bất cứ vi phạm về bản quyền và nội dung về hình ảnh do thành viên đăng tải.Xin vui lòng đọc kỹ <a href="/viewPage.html?page=term">Điều Khoản Sử Dụng</a></p>
            		<a href="#" id="uploadAvatarSubmitButton" class="icon_1 btnUploadAvatar">Đăng ảnh</a>
    	        </form>
    	        <div class="clearthis"></div>
    	        <div id="progressBar" style="display: none;">
		            <div id="theMeter">
		                <div id="progressBarText"></div>
		                <div id="progressBarBox">
		                    <div id="progressBarBoxContent"></div>
		                </div>
		            </div>
		        </div>           		
        	</div>        	     	
      	</div> 
    </div> 
    <!--div class="confirmationBox" style="border:5px solid #666; display:none;">
		<span class="icon_1"></span>
	    <p>Bạn vừa thực hiện xóa một nội dung nào đó. Nếu chắc chắn với việc thực hiện này, vui lòng nhấn nút <b>Xóa bài viết</b> ở dưới!
	    <br />
	    <a class="deleteEntry icon_1" href="#">Xóa bài viết</a>
	    <a href="#" class="deleteCancel">Hủy! Không xóa!</a>
	    </p>
	</div-->       
	<script src="http://cdn.wibiya.com/Toolbars/dir_0601/Toolbar_601897/Loader_601897.js" type="text/javascript"></script> 
	<style>
		.WibiyaToolbarIcon_2302469{background:none;}
	</style>
   </body>  
</html>